package org.jackysoft.service.impl;

import java.util.Collection;

import javax.annotation.Resource;

import org.jackysoft.data.AbstractDataProvider;
import org.jackysoft.entity.FieldAccess;
import org.jackysoft.mapper.FieldAccessMapper;
import org.jackysoft.service.FieldAccessService;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Service;

@Service
public class FieldAccessServiceImpl extends
		AbstractDataProvider<FieldAccess> implements
		FieldAccessService {

	@Resource
	FieldAccessMapper mapper;
	
	public FieldAccessServiceImpl() {
		super();
	}


	@Override
	public Collection<FieldAccess> getReadonly(String refname,long stepId)throws DataAccessException {
		Collection<FieldAccess> alist = mapper.findAllByPk(refname, stepId);
		return alist;
	}


	@Override
	public Collection<FieldAccess> getOfReadonly(long refid, long stepId) {
		Collection<FieldAccess> alist = mapper.findAllOfPk(refid, stepId);
		return alist;
	}

}